package com.spring.aop.exposeproxy;

import org.springframework.aop.framework.AopContext;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @ClassName TestServiceImpl
 * @Description
 * @Author suncx
 * @Date 2020/6/7 14:44
 * @Version 1.0
 */
public class TestServiceImpl implements TestService {

    @ScxMethodInterceptor
    public void test1() {
        System.out.println("this is test1");
        // 从当前代理类中的实现处理调用test2 未配置expose-proxy 会报错
//        ((TestService) AopContext.currentProxy()).test2();
    }

    public void test2() {
        System.out.println("this is test2");
    }
}
